package cn.intotw.pp.server.config;

import lombok.extern.log4j.Log4j;
import org.springframework.beans.factory.config.PropertiesFactoryBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Properties;

/**
 * @author Chenxiang
 * @Description: Spring配置加载器
 * @create 2018/8/15 16:10
 */
@Log4j
//@Configuration
//@ComponentScan(basePackages = {"cn.intotw.*"})
//@ImportResource("classpath:applicationContext.xml")
public class SpringConfiguer implements Configuer {
    public static ApplicationContext applicationContext;
    public void initConfig() {
        applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml");
        if(applicationContext!=null)
        {
            log.info("Spring 初始化结束");
        }
    }
}